<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/pub/head_latest.inc"%>
<title>流程实体监控-跳转环节选择-${basePageTitle}</title>
</head>
<body>
<!-- DEMO演示功能-分页列表 -->
	<!-- 这里定义了转发进入的TAB对应的菜单ID，也是TAB的属性ID值 -->
<input type="hidden" name="menuId" id="menuId" value="${param.menuId}"/>
<div id="maingrid" style="margin-top: 5px"></div> 
<div id="remarkGird" style="margin-top: 5px;margin-left:10px;">
		<tr>
			<td>
				<span>操作意见：</span>
				<textarea rows="5" cols="2" id="remark" style="width:350px;heigth:163px;"></textarea>	
			</td>
		</tr>
</div> 

  <script type="text/javascript">
  	  function FF_Select(callback){
  		var tid = $("input[name='targetNodeId']:checked").val();
  		if(!tid || tid.length <= 0) {
  			LG.showWarn("请先选择需要跳转的目标环节!", function(){
  				callback({hasOk : false});
  			}); 
  			return false;
  		}
  		var remark = document.getElementById('remark').value.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g, "");
  		if(remark == null || remark == '' ){
  			LG.showWarn("请填写操作意见!", function(){
  				callback({hasOk : false});
  			}); 
  			return false;
  		}
  		remark = encodeURI("跳转意见："+ remark); 
  		remark = encodeURI(remark);
  		callback({hasOk : true, targetNodeId : tid, JumpRemark : remark});
  	  }
  	  
  	  $(function(){
  		//列表结构
  	     var grid = $("#maingrid").ligerGrid({ 
  	          columns: [
				{display:"选择",name:"id",width:30,type:"text",align:"center",isSort : false,
					render : function(item){
						return "<input type='radio' id='n"+item.id+"' name='targetNodeId' value='"+item.id+"'/>";
				}},
  	          	{display:"环节",name:"nodeName",width:250,type:"text",align:"center",isSort : false}
  	          ],
  	          dataAction: 'server' ,
  	          onSelectRow : function(rowdata, rowid, rowobj){
  	        	  $("input[name='targetNodeId']").attr("checked", false);
  	        	  $("#n"+rowdata.id).attr("checked", true);
  	          },
  	          url: '${baseURL}/instance/node/nodeinstanceselectlist/listJSON.do?fiId=${param.fiId}', sortName: 'code',
  	          width: '95%', height: '70%',heightDiff:-10, checkbox: false,usePager : false,
  	          rowHeight:23,rownumbers:true,isScroll:true,sortnameParmName:"sortName",
  	          sortorderParmName:"sortOrder",
  	      });
  	  });
  </script>
</body>
</html>
